<%@page import="ca.uvic.group2.ui.*"%>
<%@page import="ca.uvic.group2.api.*"%>
<%@page import="java.util.*"%>


<html>
<head>
<title>StockServ Receipt</title>
<style>
body
{
        background-color: white;
}

form
{
        margin: 0px;
        padding: 0px;
}

.loginform
{
        border: 1px solid black;
        background-color: #ccc;
        width: 50%;
        margin-left: 25%;
        margin-right: 25%;
        margin-top: 10px;
}
.errorMessage
{
        border: 1px solid #990;
        background-color: #FFA;
        margin: 5px;
}
</style>

<script>
function setFocus() { }
</script>
</head>

<body onload="setFocus();">
<h1>StockServ Debug Menu</h1>
<div class='loginform'>
<%
   Receipt r = (Receipt)request.getAttribute("receipt");
%>
<center><table>
        <tr>
                <th colspan=2>Purchase Receipt</th>
        </tr>
        <tr>
                <td>Confirmation String:</td>
                <td><% out.print(r.confirmation); %></td>
        </tr>
        <tr>
                <td>New Balance:</td>
                <td><% out.print(String.valueOf(r.balance)); %></td>
        </tr>
        <tr>
                <th colspan=2>Purchase Order:</td>
        </tr>
        <tr>
                <td>Stock Symbol:</td>
                <td><% out.print(r.order.quote.stock); %></td>
        </tr>
        <tr>
                <td>Stock Price:</td>
                <td><% out.print(String.valueOf(r.order.quote.price)); %></td>
        </tr>
        <tr>
                <td>Number of stock:</td>
                <td><% out.print(String.valueOf(r.order.amount)); %></td>
        </tr>
        <tr>
                <td>Total: $</td>
                <td><% out.print(String.valueOf(r.order.quote.price.doubleValue() * r.order.amount)); %></td>
        </tr>
        <tr>
                <td></td>
                <td><form action="stockserv"><input type="submit" value="OK"></form></td>
        </tr>
</table></center>
</div>


</body>
</html>
